home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / magazi~1 / 435 / sweep.lst < prev    next >
Encoding:
File List  |  1989-08-17  |  23.6 KB  |  1,168 lines

  1. Rem *************************************
  2. Rem *                                   *
  3. Rem *      Survey Sweepstakes           *
  4. Rem *                                   *
  5. Rem *      by A. Baggetta               *
  6. Rem *      Copyright 1989               *
  7. Rem *      by ANALOG Computing          *
  8. Rem *                                   *
  9. Rem *************************************
  10. Dim Oldcolri(15),Oldcolrr(15),Oldcolrg(15),Oldcolrb(15)
  11. Dim Name$(9),Nv(10),Chs$(11)
  12. Dim Q0$(100),Q1$(100),I0$(100),I1$(100),I2$(100),I3$(100),I4$(100)
  13. Dim I5$(100),I6$(100),I7$(100),I8$(100),I9$(100)
  14. '
  15. If Xbios(4)<>0
  16.   Alert 3,"Low Rez Only",1,"Sorry",Dummy%
  17.   End
  18. Endif
  19. @Colr_get
  20. Round=0
  21. Sr=99
  22. Turn=0
  23. Sound 1,0
  24. Wave 1,0
  25. Setcolor 4,2,1,4
  26. Setcolor 10,7,7,7
  27. Setcolor 9,7,7,7
  28. Print At(14,2);"Select A File"
  29. @Lod_file
  30. If Ed=1 Then
  31.   Goto Finish
  32. Endif
  33. Hidem
  34. Storage$=""
  35. Your_name$="--------------------"
  36. Topgame:
  37. If Round=Sr Then
  38.   @Winner_screen
  39.   If Ik$="Y" Or Ik$="y" Then
  40.     Turn=0
  41.     Ik$=""
  42.     Round=0
  43.     Sr=99
  44.     Goto Topgame
  45.   Endif
  46.   If Ik$="N" Or Ik$="n" Then
  47.     Cls
  48.     Goto Finish
  49.   Endif
  50. Endif
  51. @Opening
  52. @Place_question
  53. Leave=0
  54. Repeat
  55.   If C_t_y=1 Then
  56.     @Input_your_answers
  57.   Endif
  58.   '
  59.   ' quit
  60.   '
  61.   If Ik$="Y" Or Ik$="y" Then
  62.     Turn=0
  63.     Ik$=""
  64.     Round=0
  65.     Sr=99
  66.     Goto Topgame
  67.   Endif
  68.   If Ik$="N" Or Ik$="n" Then
  69.     Cls
  70.     Goto Finish
  71.   Endif
  72.   '
  73.   If C_t_n=1 Then
  74.     @Input_norman_answer
  75.   Endif
  76. Until Leave=1
  77. If Rev$="Y" Or Rev$="y" Then
  78.   Prbox 10,60,150,150
  79.   Prbox 160,60,300,150
  80.   Ancol=3
  81.   Anrow=9
  82.   For Blank=9 To 17
  83.     Print At(3,Blank);"                "
  84.   Next Blank
  85.   Print At(Ancol,Anrow);"Correct Answers"
  86.   Anrow=Anrow+1
  87.   For Ani=0 To 4
  88.     Print At(Ancol,Anrow+(Ani+1));Chs$(Ani)
  89.   Next Ani
  90.   Print At(Ancol,Anrow+(Ani+1)+2);"**Press Return**"
  91.   Repeat
  92.   Until Inkey$<>""
  93. Endif
  94. Leave=0
  95. Goto End_round
  96. '
  97. Face_data:
  98. Data 0,0,11,0,11,0,17,3,17,3,25,11,25,11,29,23,29,23,31,20,31,20,33,19
  99. Data 33,19,36,20,36,20,37,22,37,22,36,26,36,26,34,29,34,29,30,31,30,31
  100. Data 29,39,29,39,27,47,27,47,22,52,22,52,17,54,17,54,9,55,9,55,2,55,2,55
  101. Data -6,54,-6,54,-11,52,-11,52,-16,47,-16,47,-18,39,-18,39,-19,31,-19,31
  102. Data -23,29,-23,29,-24,26,-24,26,-24,22,-24,22,-23,20,-23,20,-22,19,-22,19
  103. Data -20,20,-20,20,-18,23,-18,23,-14,10,-14,10,-6,3,-6,3,0,0
  104. ' brows
  105. Data -11,22,-7,20,-7,20,-3,20,-3,20,0,20,0,20,2,22
  106. Data 9,22,11,21,11,21,14,20,14,20,18,20,18,20,22,22
  107. ' glasses
  108. ' bridge
  109. ' left view
  110. Data -18,22,-10,24,-10,24,21,25,21,25,29,22
  111. Data -10,24,-12,27,-12,27,-12,30,-12,30,-11,33,-11,33,-9,34,-9,34,-5,34
  112. Data -5,34,0,30,0,30,1,27,1,27,1,24
  113. ' glasses
  114. ' right view
  115. Data 10,24,10,27,10,27,11,30,11,30,16,34,16,34,20,34,20,34,22,33,22,33
  116. Data 23,30,23,30,23,27,23,27,21,25
  117. ' nose
  118. Data 0,30,0,33,0,33,-1,36,-1,36,-3,38,-3,38,-4,40,-4,40,-1,41,-1,41
  119. Data 4,42,4,42,7,42,7,42,12,41,12,41,15,40,15,40,14,38,14,38,12,36,12,36
  120. Data 11,33,11,33,11,30
  121. ' smile mouth
  122. Data -11,40,-5,45,-5,45,2,47,2,47,9,47,9,47,16,45,16,45,22,40
  123. ' tooth
  124. Data -2,46,-2,49,-2,49,2,49,2,49,2,47
  125. '
  126. Procedure Draw_faces
  127.   Color 8
  128.   Restore Face_data
  129.   Repeat
  130.     Read C0%,R0%,C1%,R1%
  131.     Line C%+C0%/2,R%+R0%/2,C%+C1%/2,R%+R1%/2
  132.   Until C0%=2 And R0%=49 And C1%=2 And R1%=47
  133.   Plot C%-7/2,R%+28/2    ! Place Knowing Norman's eyes
  134.   Plot C%-6/2,R%+28/2
  135.   Plot C%+17/2,R%+28/2
  136.   Plot C%+18/2,R%+28/2
  137.   Deffill 9,2,8
  138.   Fill C%+5,32
  139.   Deffill 3,2,8
  140.   Fill C%-5/2,R%+29/2
  141.   Fill C%+19/2,R%+29/2
  142.   Deffill 12,2,8
  143.   Fill C%+2/2,R%+27/2
  144.   Deffill 0,2,8
  145.   Fill C%+28/2,R%+25/2
  146. Return
  147. '
  148. '
  149. Procedure Smile
  150.   Graphmode 2
  151.   Restore Dt0
  152.   R%=30
  153.   C%=225
  154.   Repeat
  155.     Read C0%,R0%,C1%,R1%
  156.     Line C%+C0%/2,R%+R0%/2,C%+C1%/2,R%+R1%/2
  157.   Until C0%=2 And R0%=49 And C1%=2 And R1%=47
  158.   Dt0:
  159.   Data -11,40,-5,45,-5,45,2,47,2,47,9,47,9,47,16,45,16,45,22,40
  160.   ' tooth
  161.   Data -2,46,-2,49,-2,49,2,49,2,49,2,47
  162. Return
  163. '
  164. Procedure Sadness
  165.   Restore Dt1
  166.   R%=30
  167.   C%=225
  168.   Repeat
  169.     Read C0%,R0%,C1%,R1%
  170.     Line C%+C0%/2,R%+R0%/2,C%+C1%/2,R%+R1%/2
  171.   Until C0%=16 And R0%=45 And C1%=22 And R1%=47
  172.   Dt1:
  173.   Data -11,47,-5,45,-5,45,16,45,16,45,22,47
  174. Return
  175. '
  176. '
  177. ' keep the old color pallett
  178. '
  179. Procedure Colr_get
  180.   For I%=0 To 15
  181.     @Vq_color(I%)
  182.     Oldcolri(I%)=I%
  183.     Oldcolrr(I%)=R%
  184.     Oldcolrg(I%)=G%
  185.     Oldcolrb(I%)=B%
  186.   Next I%
  187. Return
  188. '
  189. Procedure Vq_color(I%)
  190.   Dpoke Contrl,26
  191.   Dpoke Contrl+2,0
  192.   Dpoke Contrl+4,0
  193.   Dpoke Contrl+6,2
  194.   Dpoke Contrl+8,0
  195.   Dpoke Intin,I%
  196.   Dpoke Intin+2,1
  197.   Vdisys
  198.   R%=Dpeek(Intout+2)
  199.   G%=Dpeek(Intout+4)
  200.   B%=Dpeek(Intout+6)
  201. Return
  202. '
  203. ' restore old colors and end
  204. '
  205. Finish:
  206. For I%=0 To 15
  207.   In%=Oldcolri(I%)
  208.   R%=Oldcolrr(I%)
  209.   G%=Oldcolrg(I%)
  210.   B%=Oldcolrb(I%)
  211.   Gosub Vr_color(In%,R%,G%,B%)
  212. Next I%
  213. End
  214. '
  215. Procedure Vr_color(In%,R%,G%,B%)
  216.   Dpoke Contrl,14
  217.   Dpoke Contrl+2,0
  218.   Dpoke Contrl+6,4
  219.   Dpoke Intin,In%
  220.   Dpoke Intin+2,R%
  221.   Dpoke Intin+4,G%
  222.   Dpoke Intin+6,B%
  223.   Vdisys
  224. Return
  225. '
  226. Procedure Opening
  227.   Cls
  228.   Reveal=0
  229.   Ang=0
  230.   Mik=0
  231.   If Turn=0 Then
  232.     Yscr=0
  233.     Nscr=0
  234.     Deffill 4,2,19
  235.     Color 4
  236.     Box 0,0,310,199
  237.     Box 40,25,270,170
  238.     Fill 5,5
  239.     Print At(10,6);"Hi, I'm      Norman!"
  240.     C%=150
  241.     R%=30
  242.     @Draw_faces
  243.     Deftext 4,4,0,6
  244.     Text 77,168,"Survey Sweepsteaks"
  245.     Print At(10,10);"Your name, please: ";
  246.     Print At(12,13);Your_name$
  247.     Print At(10,13);
  248.     Form Input 20,New_name$
  249.     If New_name$="" Then
  250.       ==>       New_name$=Your_name$
  251.     Else
  252.       Your_name$=New_name$
  253.     Endif
  254.     Print At(10,15);"Reveal Answers? Y/N"
  255.     Leap:
  256.     Print At(30,15);
  257.     Form Input 1,Rev$
  258.     If Rev$<>"Y" And Rev$<>"y" And Rev$<>"N" And Rev$<>"n" Then
  259.       Print At(30,15);"  "
  260.       Goto Leap
  261.     Endif
  262.     Asr=5
  263.     Bsr=10
  264.     Sr=Int(Rnd*(Bsr-Asr+1))+Asr
  265.     Print At(10,17);"      Rounds: "
  266.     Print At(10,18);"   In This Game ";Sr
  267.     Pause 100
  268.   Endif
  269.   Used$=""
  270.   Bonus=0
  271.   Chance%=0
  272.   Chance2%=0
  273.   Ritechk%=0
  274.   Ritechk2%=0
  275.   Col%=2
  276.   Row%=10
  277.   Coln%=22
  278.   Rown%=10
  279.   If Turn=0 Then
  280.     Deffill 4,2,8
  281.     Pbox 0,0,310,200
  282.     Deftext 7,4,0,24
  283.     Graphmode 2
  284.     Text 19,22,"Survey Sweepstakes"
  285.     Deftext 6,4,0,24
  286.     Text 20,23,"Survey Sweepstakes"
  287.     C%=225                            ! Place Norman Face
  288.     R%=30
  289.     @Draw_faces
  290.     Deftext 8,0,0,4
  291.     Text 20,55,Your_name$
  292.     Text 170,55,"Knowing"
  293.     Text 245,55,"Norman"
  294.     Deffill 1,2,8        ! Define two text windows in black
  295.     Color 10
  296.     Rbox 159,59,301,151  ! Outline Norman's box
  297.     Prbox 160,60,300,150
  298.     Color 11
  299.     Rbox 9,59,151,151    ! Outline your
  300.     Prbox 10,60,150,150
  301.     Deffill 0,2,8
  302.     Deftext 1,0,0,4
  303.     Color 0
  304.     Rbox 9,154,301,186   ! Outline question box in pink
  305.     Prbox 10,155,300,185 ! Define a white window for questions
  306.     Get 0,0,310,199,Screen$
  307.     Deftext 8,0,0,4
  308.     Text 165,150,"Score:"+Str$(Nscr)
  309.     Text 15,150,"Score:"+Str$(Yscr)
  310.     Deftext 1,0,0,8
  311.     Text 45,172,Chr$(158)+"rice "+Chr$(214)+"aterhose,"+Chr$(216)+"nc."
  312.     Deftext 1,1,0,4
  313.     Text 65,181,"Fictionalized Perlustrations"
  314.     Deffill 0,2,8
  315.     Pbox 108,35,190,45
  316.     @In_song
  317.     Deftext 1,1,0,4
  318.     Text 115,42,"Press A Key"
  319.     @Mug_it
  320.     Repeat
  321.     Until Inkey$<>""
  322.   Else
  323.     Put 0,0,Screen$,3
  324.   Endif
  325.   @Comment
  326.   @Mug_it
  327.   Pause 100
  328.   Deffill 1,2,8
  329.   Prbox 160,60,300,150
  330.   Turn=1
  331.   Deffill 1,2,8
  332.   Prbox 10,140,150,150
  333.   Deftext 8,0,0,4
  334.   Text 15,150,"Score: "+Str$(Yscr)
  335.   Prbox 160,140,300,150
  336.   Text 165,150,"Score: "+Str$(Nscr)
  337.   '
  338.   Deftext 1,0,0,4      ! Set up and identify the notice boxes
  339.   Deffill 2,2,8
  340.   Prbox 10,188,50,198
  341.   Text 16,195,"RIGHT"
  342.   Deffill 3,2,8
  343.   Prbox 70,188,110,198
  344.   Text 76,195,"WRONG"
  345.   Deffill 6,2,8
  346.   Prbox 130,188,210,198
  347.   Text 148,195,"ILLEGAL"
  348.   Deffill 1,2,8
  349.   Color 2
  350.   Rbox 270,188,290,198
  351.   Color 3
  352.   Rbox 271,189,289,197
  353.   Prbox 272,190,288,196
  354.   Deftext 2,0,0,4
  355.   Text 225,196,"Timer->"
  356.   Deftext 0,0,0,4
  357.   Text 277,195,"  "
  358.   Color 2
  359.   Rbox 95,32,200,48
  360.   Bn=Int(Rnd*5)+1          ! If Bn=5 then we get a bonus round
  361.   If Bn=5 Then             ! Twenty points instead of ten
  362.     Graphmode 3
  363.     Text 20,45,"BONUS"
  364.     @Bonus_sound
  365.     For Rpt=1 To 6
  366.       Text 20,45,"BONUS"
  367.       Pause 10
  368.     Next Rpt
  369.     Bonus=1
  370.   Endif
  371.   Graphmode 2
  372. Return
  373. '
  374. Procedure Place_question
  375.   Deffill 0,2,8
  376.   Round=Round+1
  377.   Pbox 108,35,190,45
  378.   Deftext 1,16,0,4
  379.   Text 125,42,"ROUND "+Str$(Round)
  380.   Deftext 1,0,0,4
  381.   Color 15
  382.   Rbox 9,154,301,186   ! Outline question box in pink
  383.   Prbox 10,155,300,185 ! Define a white window for questions
  384.   @Select_data
  385.   Text 15,170,Quest0$
  386.   Text 15,177,Quest1$
  387.   C_t_y=1
  388. Return
  389. '
  390. Procedure Input_your_answers
  391.   C_t_n=0
  392.   C_t_y=0
  393.   Leave=0
  394.   '
  395.   U1:
  396.   Graphmode 2
  397.   Response$=""
  398.   Inc Chance%
  399.   Yclr%=7
  400.   Col%=2
  401.   Lk%=0
  402.   Print At(Col%-1,Row%);">"
  403.   Print At(Col%+1,Row%);"                "
  404.   Tmc=0
  405.   Tm=11
  406.   Deftext 0,0,0,4
  407.   Deffill 1,2,8
  408.   Repeat
  409.     Inc Tmc
  410.     If Tmc=1000 Then
  411.       Sound 1,15,5,7
  412.       Dec Tm
  413.       Tmc=0
  414.       Prbox 272,190,288,196
  415.       If Tm=10 Then
  416.         Text 274,195,Str$(Tm)
  417.       Else
  418.         Text 277,195,Str$(Tm)
  419.       Endif
  420.       If Tm=0 Then
  421.         Graphmode 3
  422.         Sound 1,0
  423.         Setcolor 10,7,7,7
  424.         Text 277,195,Str$(Tm)
  425.         Pause 10
  426.         Tm=11
  427.         Tmc=0
  428.         @Bounce_out
  429.         Graphmode 2
  430.         '
  431.         ' If you cannot answer subtract 10 points from your score and
  432.         ' give to norman.  Show capitalization on norman window.
  433.         '
  434.         Yscr=Yscr-10
  435.         Deffill 1,2,8
  436.         Prbox 10,140,150,150
  437.         Deftext 8,0,0,4
  438.         Text 15,150,"Score: "+Str$(Yscr)
  439.         Nscr=Nscr+10
  440.         Prbox 160,140,300,150
  441.         Deftext 8,0,0,4
  442.         Text 165,150,"Score: "+Str$(Nscr)+" CAPITALIZED"
  443.         @Capitalize_sound
  444.         Prbox 160,140,300,150
  445.         Deftext 8,0,0,4
  446.         Text 165,150,"Score: "+Str$(Nscr)
  447.         '
  448.         Graphmode 2
  449.         C_t_n=1
  450.       Endif
  451.       If C_t_n=1 Then
  452.         Goto Byebye
  453.       Endif
  454.     Endif
  455.     X$=Inkey$
  456.     If Lk%=16 Then
  457.       Goto Out
  458.     Endif
  459.     Dec Yclr%
  460.     Setcolor 10,Yclr%,Yclr%,Yclr%
  461.     If Yclr%=0 Then
  462.       Yclr%=7
  463.     Endif
  464.     If X$<>"" And X$<>Chr$(8) Then ! IF A LEGAL KEY IS PRESSED PRINT IT
  465.       Inc Col%
  466.       Print At(Col%,Row%);X$
  467.       Response$=Response$+X$
  468.       Inc Lk%
  469.     Endif
  470.     If X$=Chr$(8) Then           !IF THE BACKSPACE KEY IS PRESSED ERASE NAME$
  471.       For Ers%=3 To Col%
  472.         Print At(Ers%,Row%);" "
  473.       Next Ers%
  474.       Col%=2
  475.       Response$=""
  476.       Lk%=0
  477.     Endif
  478.     Sound 1,0
  479.   Until X$=Chr$(13)              ! IF THE RETURN KEY IS PRESSED JUMP OUT
  480.   ==>   Out:
  481.   Sound 1,0
  482.   Graphmode 2
  483.   Prbox 272,190,288,196          ! FILL IN TIMER WITH BLANK
  484.   Rn=-1
  485.   Setcolor 10,7,7,7
  486.   Response$=Mid$(Response$,1,Len(Response$)-1)
  487.   If Mid$(Response$,1,1)>"\" And Mid$(Response$,1,1)<"{" Then
  488.     Convt$=Mid$(Response$,1,1)
  489.     Convt=Asc(Convt$)
  490.     Convt=Convt-32
  491.     Mid$(Response$,1,1)=Chr$(Convt)
  492.   Endif
  493.   If Mid$(Response$,1,4)="Quit" Or Mid$(Response$,1,4)="quit" Then
  494.     @Winner_screen
  495.     Goto Byebye
  496.   Endif
  497.   If Mid$(Response$,1,5)="Chall" Or Mid$(Response$,1,5)="chall" And Mik=0 Then
  498.     Mik=1
  499.     Inc Row%
  500.     C_t_n=1
  501.     @Chall_music
  502.     Goto Byebye
  503.   Endif
  504.   If Mid$(Response$,1,5)="Chall" Or Mid$(Response$,1,5)="chall" And Mik=1 Then
  505.     @Ill_sign
  506.     Goto U1
  507.   Endif
  508.   If Mid$(Response$,1,4)=Mid$(Chs$(0),1,4) Then
  509.     Rn=0
  510.   Endif
  511.   If Mid$(Response$,1,4)=Mid$(Chs$(1),1,4) Then
  512.     Rn=1
  513.   Endif
  514.   If Mid$(Response$,1,4)=Mid$(Chs$(2),1,4) Then
  515.     Rn=2
  516.   Endif
  517.   If Mid$(Response$,1,4)=Mid$(Chs$(3),1,4) Then
  518.     Rn=3
  519.   Endif
  520.   If Mid$(Response$,1,4)=Mid$(Chs$(4),1,4) Then
  521.     Rn=4
  522.   Endif
  523.   If Mid$(Response$,1,4)=Mid$(Chs$(5),1,4) Then
  524.     Rn=5
  525.   Endif
  526.   If Mid$(Response$,1,4)=Mid$(Chs$(6),1,4) Then
  527.     Rn=6
  528.   Endif
  529.   If Mid$(Response$,1,4)=Mid$(Chs$(7),1,4) Then
  530.     Rn=7
  531.   Endif
  532.   If Mid$(Response$,1,4)=Mid$(Chs$(8),1,4) Then
  533.     Rn=8
  534.   Endif
  535.   If Mid$(Response$,1,4)=Mid$(Chs$(9),1,4) Then
  536.     Rn=9
  537.   Endif
  538.   If Rn<0 Or Rn>9 Then
  539.     Goto Jumpover
  540.   Endif
  541.   '
  542.   ' It it has been used catch it and offer another chance
  543.   '
  544.   @Used_check
  545.   If Cku=1 Then
  546.     @Ill_sign
  547.     Dec Chance%
  548.     Goto U1
  549.   Endif
  550.   Used$=Used$+Str$(Rn)
  551.   Cku=0
  552.   '
  553.   Jumpover:
  554.   @Check_answers
  555.   If Right%=1 Then
  556.     @Correct
  557.     Inc Ritechk%
  558.     Inc Row%
  559.     If Bonus=1 Then    ! If bonus round give an extra 10 points
  560.       Yscr=Yscr+20
  561.     Else
  562.       Yscr=Yscr+10
  563.     Endif
  564.     Deffill 1,2,8
  565.     Prbox 10,140,150,150
  566.     Deftext 8,0,0,4
  567.     For Rs=1 To 5
  568.       Graphmode 3
  569.       Text 15,150,"Score: "+Str$(Yscr)
  570.       Pause 10
  571.     Next Rs
  572.     Graphmode 2
  573.     C_t_y=1
  574.   Else
  575.     @Incorrect
  576.     Inc Row%
  577.     If Bonus=1 Then
  578.       Nscr=Nscr+20
  579.     Else
  580.       Nscr=Nscr+10
  581.     Endif
  582.     Deffill 1,2,8
  583.     Prbox 160,140,300,150
  584.     Deftext 8,0,0,4
  585.     For Rs=1 To 5
  586.       Graphmode 3
  587.       Text 165,150,"Score: "+Str$(Nscr)
  588.       Pause 10
  589.     Next Rs
  590.     Graphmode 2
  591.     C_t_n=1
  592.   Endif
  593.   '
  594.   ' Check to see if your number of chances have been alloted or
  595.   ' If you have three correct answers to win
  596.   '
  597.   If Ritechk%=3 Then
  598.     Leave=1
  599.     Yscr=Yscr+20
  600.     Deffill 1,2,8
  601.     Prbox 10,140,150,150
  602.     Deftext 8,0,0,4
  603.     For Rs=1 To 5
  604.       Graphmode 3
  605.       Text 15,150,"Score: "+Str$(Yscr)
  606.       Pause 10
  607.     Next Rs
  608.     Graphmode 2
  609.     Goto Byebye
  610.   Endif
  611.   If Chance%=4 Then
  612.     Leave=1
  613.   Endif
  614.   Byebye:
  615.   Graphmode 2
  616. Return
  617. '
  618. Procedure Input_norman_answer
  619.   C_t_n=0
  620.   C_t_y=0
  621.   @Mug_it
  622.   Leave=0
  623.   For Trpt=1 To 4
  624.     Graphmode 3
  625.     Deftext 0,0,0,4
  626.     Text 230,149,"MY TURN!!"
  627.     Pause 20
  628.   Next Trpt
  629.   Inc Chance2%
  630.   Response$=""
  631.   U2:
  632.   Rn=0
  633.   Coln%=22
  634.   Rn=Int(Rnd*15)
  635.   If Rn>9 And Ang=0 Then
  636.     Response$="Challenge       "
  637.     Ang=1                        ! Allow only one challange
  638.     Coln%=21
  639.     Ad%=0
  640.     Print At(Coln%+1,Rown%);"                "
  641.     For Prtnm=1 To Len(Response$)
  642.       Inc Ad%
  643.       Print At(Coln%+Ad%,Rown%);Mid$(Response$,Prtnm,1)
  644.       Pause Int(Rnd*20)+1
  645.     Next Prtnm
  646.     Inc Rown%
  647.     C_t_y=1
  648.     @Chall_music
  649.     Goto Byebye2
  650.   Endif
  651.   If Rn>9 And Ang=1 Then
  652.     Goto U2
  653.   Endif
  654.   '
  655.   ' Do not allow any repeats of the number
  656.   '
  657.   @Used_check
  658.   If Cku=1 Then
  659.     Goto U2
  660.   Endif
  661.   Used$=Used$+Str$(Rn)
  662.   Cku=0
  663.   '
  664.   Response$=Chs$(Rn)
  665.   Pz=Int(Rnd*12000)+1
  666.   Tmc=0
  667.   Tm=11
  668.   Graphmode 2
  669.   Deftext 0,0,0,4
  670.   Text 230,149,"Hmmmmmmm?"
  671.   For Pzrpt=1 To Pz
  672.     Tmc=Tmc+1
  673.     If Tmc=1000 Then
  674.       Sound 1,15,5,7
  675.       Tm=Tm-1
  676.       Tmc=0
  677.       Prbox 272,190,288,196
  678.       If Tm=10 Then
  679.         Text 274,195,Str$(Tm)
  680.       Else
  681.         Text 277,195,Str$(Tm)
  682.       Endif
  683.       If Tm=0
  684.         Graphmode 3
  685.         Text 230,149,"Hmmmmmmm?"
  686.         Graphmode 2
  687.         Sound 1,0
  688.         For Rptmr=1 To 3
  689.           Graphmode 3
  690.           Text 277,195,Str$(Tm)
  691.           Pause 10
  692.         Next Rptmr
  693.         Graphmode 2
  694.         Tm=10
  695.         Tmc=0
  696.         @Bounce_out
  697.         C_t_y=1
  698.         If C_t_y=1 Then
  699.           Goto Ot
  700.         Endif
  701.       Endif
  702.     Endif
  703.     Ot:
  704.     Sound 1,0
  705.     Exit If C_t_y=1
  706.   Next Pzrpt
  707.   If C_t_y=1 Then
  708.     Goto Byebye2
  709.   Endif
  710.   Graphmode 3
  711.   Text 230,149,"Hmmmmmmm?"
  712.   Sound 1,0
  713.   Coln%=21
  714.   Ad%=0
  715.   Fka=65
  716.   Fkb=122
  717.   Print At(Coln%+1,Rown%);"                "
  718.   Stln=Len(Response$)
  719.   For Prtnm=1 To Stln
  720.     Inc Ad%
  721.     Print At(Coln%+Ad%,Rown%);Mid$(Response$,Prtnm,1)
  722.     Pause Int(Rnd*40)+1
  723.     Fk=Int(Rnd*(Fkb-Fka+1))+Fka    ! Norman makes typing errors and
  724.     Fkk=Int(Rnd*5)+1               ! corrects them.
  725.     If Fkk=5 And Stln<>Prtnm Then
  726.       Print At(Coln%+Ad%+1,Rown%);Chr$(Fk)
  727.       Pause Int(Rnd*40)+1
  728.     Endif
  729.   Next Prtnm
  730.   Pause 80
  731.   '
  732.   @Check_answers
  733.   If Right%=1 Then
  734.     @Correct
  735.     Inc Ritechk2%
  736.     Inc Rown%
  737.     If Bonus=1 Then
  738.       Nscr=Nscr+20
  739.     Else
  740.       Nscr=Nscr+10
  741.     Endif
  742.     Deffill 1,2,8
  743.     Prbox 160,140,300,150
  744.     Deftext 8,0,0,4
  745.     For Rs=1 To 5
  746.       Graphmode 3
  747.       Text 165,150,"Score: "+Str$(Nscr)
  748.       Pause 10
  749.     Next Rs
  750.     Graphmode 2
  751.     C_t_n=1
  752.   Else
  753.     @Incorrect
  754.     Inc Rown%
  755.     If Bonus=1 Then
  756.       Yscr=Yscr+20
  757.     Else
  758.       Yscr=Yscr+10
  759.     Endif
  760.     Deffill 1,2,8
  761.     Prbox 10,140,150,150
  762.     Deftext 8,0,0,4
  763.     For Rs=1 To 5
  764.       Graphmode 3
  765.       Text 15,150,"Score: "+Str$(Yscr)
  766.       Pause 10
  767.     Next Rs
  768.     Graphmode 2
  769.     C_t_y=1
  770.   Endif
  771.   If Chance2%=>4 Then
  772.     Leave=1
  773.     Goto Byebye2
  774.   Endif
  775.   If Ritechk2%=3 Then
  776.     Leave=1
  777.     Deffill 1,2,8
  778.     Prbox 160,140,300,150
  779.     Deftext 8,0,0,4
  780.     For Rs=1 To 5
  781.       Graphmode 3
  782.       Text 165,150,"Score: "+Str$(Nscr)
  783.       Pause 10
  784.     Next Rs
  785.     Graphmode 2
  786.   Endif
  787.   Byebye2:
  788.   Graphmode 2
  789. Return
  790. '
  791. Procedure Correct
  792.   Sound 1,0
  793.   Graphmode 2
  794.   Deftext 1,0,0,4
  795.   Deffill 2,2,8
  796.   For J%=1 To 5
  797.     Sound 1,10,9,5,2
  798.     Prbox 10,188,50,198
  799.     Pause 5
  800.     Text 16,195,"RIGHT"
  801.     Sound 1,10,4,5,15
  802.   Next J%
  803.   Sound 1,0
  804.   Right%=0
  805. Return
  806. '
  807. Procedure Incorrect
  808.   Sound 1,0
  809.   Wave 1,0
  810.   Graphmode 2
  811.   Deftext 1,0,0,4
  812.   Deffill 3,2,8
  813.   Wave 1,1,14,35
  814.   For J%=1 To 5
  815.     Prbox 70,188,110,198
  816.     Pause 5
  817.     Text 76,195,"WRONG"
  818.     Pause 5
  819.   Next J%
  820.   Wave 1,0
  821. Return
  822. '
  823. Procedure Check_answers
  824.   Right%=0
  825.   Wrong%=0
  826.   For I%=0 To 4
  827.     If Mid$(Chs$(I%),1,4)=Mid$(Response$,1,4) Then
  828.       Right%=1
  829.     Endif
  830.   Next I%
  831. Return
  832. '
  833. ==> End_round:
  834. Sound 1,0
  835. Wave 1,0
  836. Cls
  837. Deffill 1,2,8
  838. Prbox 0,40,320,170
  839. Deftext 2,4,0,24
  840. Text 50,100,"End of Round "+Str$(Round)
  841. Deftext 3,4,0,6
  842. If Yscr>Nscr Then
  843.   Text 75,120,"The winner so far is "
  844.   Text 80,135,Your_name$
  845.   Text 80,150,Str$(Yscr)+" points"
  846. Endif
  847. If Nscr>Yscr Then
  848.   Text 40,120,"Seems like Norman is winning."
  849.   Text 40,135,Str$(Nscr)+" points"
  850. Endif
  851. If Nscr=Yscr Then
  852.   Text 40,120,"Well, we have a tie so far."
  853.   Text 40,135,Str$(Nscr)+" to "+Str$(Yscr)
  854. Endif
  855. Wave 1,1,12,300
  856. Scrn%=7
  857. For Srpt=1 To 20000
  858.   Dec Scrn%
  859.   If Scrn%=0 Then
  860.     Scrn%=7
  861.   Endif
  862.   Setcolor 0,Scrn%,Scrn%,Scrn%
  863. Next Srpt
  864. Setcolor 0,7,7,7
  865. Wave 1,0
  866. Bonus=0
  867. Goto Topgame
  868. '
  869. Procedure Ill_sign
  870.   Sound 1,0
  871.   Wave 1,0
  872.   Graphmode 2
  873.   Deftext 1,0,0,4
  874.   Wave 1,1,8,100
  875.   For Rpt%=1 To 5
  876.     Deffill 6,2,8
  877.     Prbox 130,188,210,198
  878.     Pause 10
  879.     Text 148,195,"ILLEGAL"
  880.     Pause 10
  881.   Next Rpt%
  882.   Wave 1,0
  883.   Graphmode 1
  884. Return
  885. '
  886. Procedure Select_data
  887.   Ss%=Int(Rnd*(Vbls-1))
  888.   Ss$=Str$(Ss%)
  889.   If Len(Ss$)<2 Then
  890.     Ss$="0"+Ss$
  891.   Endif
  892.   ==>   Add_data=Add_data+1
  893.   If Add_data=Vbls-1 Then
  894.     Storage$=""
  895.     ==>     Add_data=0
  896.   Endif
  897.   For Ex%=0 To Len(Storage$)
  898.     If Mid$(Storage$,Ex%,2)=Ss$ Then
  899.       @Select_data
  900.     Endif
  901.   Next Ex%
  902.   Storage$=Storage$+Ss$
  903.   Quest0$=Q0$(Ss%)
  904.   Quest1$=Q1$(Ss%)
  905.   Chs$(0)=I0$(Ss%)
  906.   Chs$(1)=I1$(Ss%)
  907.   Chs$(2)=I2$(Ss%)
  908.   Chs$(3)=I3$(Ss%)
  909.   Chs$(4)=I4$(Ss%)
  910.   Chs$(5)=I5$(Ss%)
  911.   Chs$(6)=I6$(Ss%)
  912.   Chs$(7)=I7$(Ss%)
  913.   Chs$(8)=I8$(Ss%)
  914.   Chs$(9)=I9$(Ss%)
  915. Return
  916. '
  917. Procedure Lod_file
  918.   Ed=0
  919.   Fileselect "a:\*.swp","Quest3.swp",Aa$
  920.   Cls
  921.   If Exist(Aa$) Then
  922.     Open "I",#1,Aa$
  923.     Input #1,A$
  924.     Vbls=Val(A$)
  925.     Print At(10,10);Aa$
  926.     Print At(10,12);"Loading....";Vbls;" Questions"
  927.     Print At(10,14);"Question #";
  928.     For I%=0 To Vbls-1
  929.       Print At(21,14);I%+1
  930.       Input #1,A$
  931.       Q0$(I%)=A$
  932.       Input #1,A$
  933.       Q1$(I%)=A$
  934.       Input #1,A$
  935.       I0$(I%)=A$
  936.       Input #1,A$
  937.       I1$(I%)=A$
  938.       Input #1,A$
  939.       I2$(I%)=A$
  940.       Input #1,A$
  941.       I3$(I%)=A$
  942.       Input #1,A$
  943.       I4$(I%)=A$
  944.       Input #1,A$
  945.       I5$(I%)=A$
  946.       Input #1,A$
  947.       I6$(I%)=A$
  948.       Input #1,A$
  949.       I7$(I%)=A$
  950.       Input #1,A$
  951.       I8$(I%)=A$
  952.       Input #1,A$
  953.       I9$(I%)=A$
  954.     Next I%
  955.     Pause 100
  956.   Else
  957.     Alert 3," | |Missing Question File",1,"END",Ab
  958.     Ed=1
  959.   Endif
  960.   Cls
  961. Return
  962. '
  963. Procedure Used_check
  964.   Cku=0
  965.   For Ex2%=1 To Len(Used$)
  966.     If Mid$(Used$,Ex2%,1)=Str$(Rn) Then
  967.       Cku=1
  968.     Endif
  969.   Next Ex2%
  970. Return
  971. '
  972. Procedure Bounce_out
  973.   Sound 1,0
  974.   Wave 1,0
  975.   For Drop=12 Downto 1
  976.     Sound 1,10,Drop,4,1
  977.   Next Drop
  978.   Sound 1,0
  979.   For Bounce=1 To 10
  980.     For Up=1 To 3
  981.       Sound 1,10,Up,4,1
  982.     Next Up
  983.     For Down=3 Downto 1
  984.       Sound 1,10,Down,4,1
  985.     Next Down
  986.   Next Bounce
  987.   Sound 1,10,1,1,10
  988.   Sound 1,0
  989.   Wave 1,0
  990. Return
  991. '
  992. Procedure Winner_screen
  993.   Graphmode 2
  994.   Cls
  995.   Sound 1,0
  996.   Wave 1,0
  997.   Deffill 1,2,8
  998.   Prbox 0,40,320,170
  999.   Deftext 2,4,0,24
  1000.   Text 100,100,"WINNER"
  1001.   Deftext 3,0,0,6
  1002.   If Nscr>Yscr Then
  1003.     Tval=Nscr*Int(Rnd*200)+1
  1004.     Tval$=Str$(Tval)
  1005.     Text 70,120,"Norman"
  1006.     Text 70,135,"$"+Tval$+"  "+Str$(Nscr)+" points"
  1007.     Nscr=0
  1008.     Tval=0
  1009.     Goto Cloz_up
  1010.   Endif
  1011.   If Yscr>Nscr Then
  1012.     Tval=Yscr*Int(Rnd*200)+1
  1013.     Tval$=Str$(Tval)
  1014.     Text 70,120,Your_name$
  1015.     Text 70,135,"$"+Tval$+"  "+Str$(Yscr)+"  points"
  1016.     Yscr=0
  1017.     Tval=0
  1018.     Goto Cloz_up
  1019.   Endif
  1020.   If Yscr<>0 And Nscr<>0 And Yscr=Nscr Then
  1021.     Text 55,120,"Tie Game...No winners here."
  1022.   Endif
  1023.   Cloz_up:
  1024.   Wave 1,1,12,300
  1025.   Scrn%=7
  1026.   Text 35,150,"<Y> to play again  <N> to end"
  1027.   Repeat
  1028.     Dec Scrn%
  1029.     If Scrn%=0 Then
  1030.       Scrn%=7
  1031.     Endif
  1032.     Setcolor 0,Scrn%,Scrn%+2,Scrn%+4
  1033.     Ik$=Inkey$
  1034.     Pause 5
  1035.   Until Ik$="Y" Or Ik$="y" Or Ik$="N" Or Ik$="n"
  1036.   Setcolor 0,7,7,7
  1037.   Wave 1,0
  1038. Return
  1039. '
  1040. Procedure Chall_music
  1041.   Sound 1,0
  1042.   Sound 2,0
  1043.   Sound 3,0
  1044.   Wave 7,0
  1045.   Restore C_major
  1046.   For G=1 To 5
  1047.     Read Nt1,Nt2,Nt3,Oct
  1048.     Sound 1,10,Nt1,5
  1049.     Sound 2,10,Nt2,5
  1050.     Sound 3,10,Nt3,5
  1051.     Wave 7,7,3,15000,10
  1052.   Next G
  1053.   C_major:
  1054.   Data 1,5,8,4
  1055.   C_minor:
  1056.   Data 1,8,4,4
  1057.   C_major_6:
  1058.   Data 1,5,10,3
  1059.   C_minor_7:
  1060.   Data 4,1,10,3
  1061.   C_7:
  1062.   Data 1,5,11,4
  1063. Return
  1064. '
  1065. Procedure In_song
  1066.   Restore Intro_song
  1067.   For Sn=1 To 9
  1068.     Del=5
  1069.     If Sn=3 Or Sn=6 Or Sn=9 Then
  1070.       Del=9
  1071.     Endif
  1072.     Read Xs
  1073.     Sound 1,10,Xs,4,Del
  1074.   Next Sn
  1075.   Sound 1,10,12,3
  1076.   Sound 2,10,3,4
  1077.   Sound 3,10,8,4
  1078.   Wave 7,7,3,8000,10
  1079.   Intro_song:
  1080.   Data 12,10,8
  1081.   Data 10,8,6
  1082.   Data 8,6,5
  1083. Return
  1084. '
  1085. Procedure Comment
  1086.   Comt=Int(Rnd*10)+1
  1087.   If Comt=1 Then
  1088.     Print At(22,12);"  Ok, Pal...   "
  1089.     Print At(22,13);"Let's gooooo!! "
  1090.   Endif
  1091.   If Comt=2 Then
  1092.     Print At(22,12);"  Ok pushover  "
  1093.     Print At(22,13);"Get cookin!!!!!"
  1094.   Endif
  1095.   If Comt=3 Then
  1096.     Print At(22,12);"Make out your  "
  1097.     Print At(22,13);"will yet???    "
  1098.   Endif
  1099.   If Comt=4 Then
  1100.     Print At(22,12);"Might as well  "
  1101.     Print At(22,13);"quit right now!"
  1102.   Endif
  1103.   If Comt=5 Then
  1104.     Print At(22,12);"Look out, kid.."
  1105.     Print At(22,13);"dis is war!!!  "
  1106.   Endif
  1107.   If Comt=6 Then
  1108.     Print At(22,12);"Scared, yet,   "
  1109.     Print At(22,13);"Pal???         "
  1110.   Endif
  1111.   If Comt=7 Then
  1112.     Print At(22,12);"Get your coffin"
  1113.     Print At(22,13);"ready!!        "
  1114.   Endif
  1115.   If Comt=8 Then
  1116.     Print At(22,12);"Your feelin' da"
  1117.     Print At(22,13);"heat now...??  "
  1118.   Endif
  1119.   If Comt=9 Then
  1120.     Print At(22,12);"Psssssssst!     "
  1121.     Print At(22,13);"Booooooooooo!.. "
  1122.   Endif
  1123.   If Comt=10 Then
  1124.     Print At(22,12);"Go back to grade"
  1125.     Print At(22,13);"school!!!       "
  1126.   Endif
  1127. Return
  1128. '
  1129. Procedure Mug_it
  1130.   Graphmode 2
  1131.   For Facerpt=1 To 3
  1132.     Sound 1,10,12,6,1
  1133.     Color 0
  1134.     @Smile
  1135.     Color 8
  1136.     @Sadness
  1137.     Pause 2
  1138.     Sound 1,10,1,6,1
  1139.     Color 0
  1140.     @Sadness
  1141.     Color 8
  1142.     @Smile
  1143.     Pause 2
  1144.   Next Facerpt
  1145.   Sound 1,0
  1146. Return
  1147. '
  1148. Procedure Bonus_sound
  1149.   For Decay=15 To 0 Step -3
  1150.     For Ups=1 To 12
  1151.       Sound 1,Decay,Ups,5,1
  1152.     Next Ups
  1153.   Next Decay
  1154. Return
  1155. '
  1156. Procedure Capitalize_sound
  1157.   For Cap=1 To 100
  1158.     For I=1 To 10
  1159.       Wave 1,1,1000,I
  1160.     Next I
  1161.     For I=10 To 1 Step -1
  1162.       Wave 1,1,1000,I
  1163.     Next I
  1164.   Next Cap
  1165.   Sound 1,0
  1166.   Wave 1,0
  1167. Return
  1168.